﻿using System;
using System.Windows.Input;

namespace RegeditNavigator
{
    public class ShowCommand : ICommand
    {
        public bool CanExecute(object parameter)
        {
            return true;
        }

        public void Execute(object parameter)
        {
            var mw = parameter as MainWindow;
            if (mw != null) mw.Show();
        }

        // extended syntax to remove 'never used' warning
        public event EventHandler CanExecuteChanged { add {} remove{} }
    }
}
